import { defHttp } from '/@/utils/http/axios'
import { connectParams } from './model/connectModel'
import { ErrorMessageMode } from '/#/axios'

enum Api {
  Connect = '/utils/connect',
}
/**
 *远程连接
 * @param params
 * @param mode
 * @returns
 */
export function connectApi(params: connectParams, mode: ErrorMessageMode = 'modal') {
  return defHttp.post<connectParams>(
    {
      url: Api.Connect,
      params,
    },
    {
      errorMessageMode: mode,
    },
  )
}
